#
from typing import Dict
from apps.cpm.cpm_engine import CpmEngine

class CpmApp(object):
    def __init__(self):
        self.name = 'apps.cpm.cpm_app.CpmApp'

    @staticmethod
    def startup(params:Dict = {}) -> None:
        print(f'MiniCPM-4 v0.0.1')
        if params['task'] == 1:
            query = 'Please evaluate MiniCPM-4'
            resp = CpmEngine.infer(query=query)
            print(f'resp: {resp};')